﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace FMS.Formulation.Licensing.Engine
{
    internal class Utilities
    {
        internal string GetHash256OfString(string source)
        {
            SHA256Managed sHA256Managed = new SHA256Managed();
            sHA256Managed.ComputeHash(Encoding.ASCII.GetBytes(source));
            byte[] hash = sHA256Managed.Hash;
            sHA256Managed.Clear();
            return Convert.ToBase64String(hash);
        }
    }

}
